{% extends "base.html" %}

{% block title %}All snippets{% endblock %}

{% block content_header %}All snippets{% endblock %}

{% block main_content %}
{% if object_list %}
<ul>
{% for snippet in object_list %}
<li><a href="{{ snippet.get_absolute_url }}">{{ snippet.title }}</a> (<a href="{{ snippet.language.get_absolute_url }}">{{ snippet.language.name }}</a>) by <a href="/users/{{ snippet.author.username }}/">{{ snippet.author.username }}</a> {{ snippet.pub_date|timesince }} ago</li>
{% endfor %}
</ul>
<p class="pagination">{% if has_previous %}<a href="?page={{ previous }}">&lt; Previous {{ results_per_page }}</a>{% endif %}&nbsp;&nbsp;{% if has_next %}<a href="?page={{ next }}">Next {{ results_per_page }} &gt;</a>{% endif %}
{% else %}
<p>No snippets posted yet.</p>
{% endif %}
{% endblock %}

{% block sidebar %}
<p>{{ hits }} snippet{{ hits|pluralize }} posted so far.</p>
<p><a rel="alternate" href="/feeds/latest/" type="application/atom+xml"><img src="http://media.djangosnippets.org/img/feed-icon-10x10.gif" alt="" /> Feed of latest snippets</a></p>
{% endblock %}